State of a component is an object that holds some information that may change over the lifetime of the component. The state is reactive data specific to an component. We should always try to make our state as simple as possible and minimize the number of stateful components.
Props are inputs to a React component.
Props are properties that are passed into a child component from its parent, and are read-only/ immutable.
They are single values or objects containing a set of values that are passed to React Components on creation using a naming convention similar to HTML-tag attributes.
Props do not have to just be data - callback functions may be passed in as props.
They are used to control data used by a child component from parent in the component tree.
Props are received from above, from parent component while state is managed by component itself
Props can not be updated by the component consuming it they are immutable while state can be updated by the component consuming it
You need a Counter component that shows a number and a button to increment it. How would you use state and props to build this?
If a parent component passes a prop to a child and then re‑renders, what happens to the child's prop values?
What would be the result of trying to assign a new value to a prop inside a functional component?
You lifted the count state up to a parent so two sibling components can share it, but one sibling isn’t updating when the button is clicked. How would you debug this?
When converting a class component that uses this.state to a functional component with useState, what changes are required for handling props?
Explain the trade‑offs between keeping UI state inside a component versus lifting it to a common ancestor.
In a dashboard with dozens of widgets, how do you decide which data lives in component state and which is passed down as props from a global store?
A component receives a large immutable prop object that changes on every fetch. What performance concerns arise and how would you address them?
Design a pattern to keep two sibling components in sync without prop‑drilling the state through multiple layers.
Your organization is migrating a legacy codebase from class components to functional components with hooks. How would you refactor state and props usage to minimize regression risk?
When creating a shared component library used by multiple product teams, what guidelines would you set for using internal state versus controlled props?
In a micro‑frontend architecture, how does passing frequently changing data via props affect bundle size and caching, and what strategies can mitigate the impact?